package com.clear.honghefinance.admin.controller;

import com.clear.honghefinance.biz.modules.dictionary.domain.vo.DataDictionaryVO;
import com.clear.honghefinance.biz.modules.dictionary.service.IDataDictionaryService;
import com.clear.honghefinance.common.dto.entity.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 数据字典管理Controller
 */
@Api(tags = "数据字典管理")
@RestController
@RequestMapping(value = "/DataDictionary")
@Slf4j
public class DataDictionaryController {
    @Resource
    private IDataDictionaryService dataDictionaryService;

    /**
     * 查询行业数据列表
     *
     * @return
     */
    @ApiOperation(value = "查询行业数据列表")
    @GetMapping(value = "/listHangYe")
    public ApiResponse<List<DataDictionaryVO>> listIndustry() {
        return ApiResponse.success(dataDictionaryService.listIndustry());
    }

    /**
     * 查询会计准则数据列表
     * @return
     */
    @ApiOperation(value = "查询会计准则数据列表")
    @GetMapping(value = "/listKuaiJiZhunZe")
    public ApiResponse<List<DataDictionaryVO>> listAccountingRules() {
        return ApiResponse.success(dataDictionaryService.listAccountingRules());
    }

}